﻿using ManageSystem.Model;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace ManageSystem.IService
{
    public interface IProjectService : IBaseService<Project>
    {
        // bool CascadeInsertProject(Project project);

        // bool CascadeUpdateProject(Project project);

        Task<List<Project>> QueryProjectsByUserName(string username);

        /// <summary>
        /// 修改项目的落地机构和合作方的分成金额、或者学校管理费比例时，更新项目相关的金额数据
        /// </summary>
        Task<List<IncomeStream>> DealWithChangedAmountOfProject(Project projectToBeUpdated, List<IncomeStream> incomeStreams);

        /// <summary>
        /// 判断是否存在名字重复的项目
        /// </summary>
        Task<bool> isProjectNameRepated(string projectName);
    }
}
